package com.fhb.java.d20250609.泛型;

import java.util.ArrayList;
import java.util.List;

/**
 * @author abao
 * @Description TODO
 * @createTime 2025-06-09 16:49:00
 */
public class 泛型测试 {

    public void test(){

        List<?> list1 = new ArrayList<String>();
        // 编译错误
//        List<Object> list2 = new ArrayList<String>();;
        List list3 = new ArrayList<String>();;

        // 数组允许协变
        Object[] objectList = new String[]{"a","b"};
    }

}
